﻿using System;
using UnityEngine;

// Token: 0x02000414 RID: 1044
public class ChangeMaterial : MonoBehaviour
{
	// Token: 0x060019FC RID: 6652 RVA: 0x000A674C File Offset: 0x000A494C
	public void Start()
	{
		Renderer[] componentsInChildren = base.GetComponentsInChildren<Renderer>();
		foreach (Renderer renderer in componentsInChildren)
		{
			Material[] array2 = new Material[renderer.materials.Length];
			for (int j = 0; j < array2.Length; j++)
			{
				Material material = new Material(this.mat);
				if (renderer.materials[j].shader.name.IndexOf(this.ignoreAlphaShader) == -1)
				{
					material.mainTexture = renderer.materials[j].mainTexture;
				}
				array2[j] = material;
			}
			renderer.materials = array2;
		}
	}

	// Token: 0x04001CE2 RID: 7394
	public Material mat;

	// Token: 0x04001CE3 RID: 7395
	public string ignoreAlphaShader = "Skin";
}
